package com.navi.loaddata.core.oracleEntity.array;

import javax.persistence.*;
import java.util.Date;

/**
 * Created by ghost on 2018/6/4.
 */
@Entity
@Table(name = "ETL_ARRAY_EQUIP_EVENT_V", schema = "EDALDR", catalog = "")
@IdClass(EtlArrayEquipEventVPK.class)
public class EtlArrayEquipEventV {
    private String equipId;
    private Date eventStartTime;
    private String eventCategory;
    private String eventCode;
    private String eventGroup;
    private String eventUser;
    private String eventComment;
    private String eventDescription;
    private Date eventEndTime;

    @Id
    @Column(name = "EQUIP_ID")
    public String getEquipId() {
        return equipId;
    }

    public void setEquipId(String equipId) {
        this.equipId = equipId;
    }

    @Id
    @Column(name = "EVENT_START_TIME")
    @Temporal(TemporalType.TIMESTAMP)
    public Date getEventStartTime() {
        return eventStartTime;
    }

    public void setEventStartTime(Date eventStartTime) {
        this.eventStartTime = eventStartTime;
    }

    @Basic
    @Column(name = "EVENT_CATEGORY")
    public String getEventCategory() {
        return eventCategory;
    }

    public void setEventCategory(String eventCategory) {
        this.eventCategory = eventCategory;
    }

    @Id
    @Column(name = "EVENT_CODE")
    public String getEventCode() {
        return eventCode;
    }

    public void setEventCode(String eventCode) {
        this.eventCode = eventCode;
    }

    @Basic
    @Column(name = "EVENT_GROUP")
    public String getEventGroup() {
        return eventGroup;
    }

    public void setEventGroup(String eventGroup) {
        this.eventGroup = eventGroup;
    }

    @Basic
    @Column(name = "EVENT_USER")
    public String getEventUser() {
        return eventUser;
    }

    public void setEventUser(String eventUser) {
        this.eventUser = eventUser;
    }

    @Basic
    @Column(name = "EVENT_COMMENT")
    public String getEventComment() {
        return eventComment;
    }

    public void setEventComment(String eventComment) {
        this.eventComment = eventComment;
    }

    @Basic
    @Column(name = "EVENT_DESCRIPTION")
    public String getEventDescription() {
        return eventDescription;
    }

    public void setEventDescription(String eventDescription) {
        this.eventDescription = eventDescription;
    }

    @Basic
    @Column(name = "EVENT_END_TIME")
    @Temporal(TemporalType.TIMESTAMP)
    public Date getEventEndTime() {
        return eventEndTime;
    }

    public void setEventEndTime(Date eventEndTime) {
        this.eventEndTime = eventEndTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        EtlArrayEquipEventV that = (EtlArrayEquipEventV) o;

        if (equipId != null ? !equipId.equals(that.equipId) : that.equipId != null) return false;
        if (eventStartTime != null ? !eventStartTime.equals(that.eventStartTime) : that.eventStartTime != null)
            return false;
        if (eventCategory != null ? !eventCategory.equals(that.eventCategory) : that.eventCategory != null)
            return false;
        if (eventCode != null ? !eventCode.equals(that.eventCode) : that.eventCode != null) return false;
        if (eventGroup != null ? !eventGroup.equals(that.eventGroup) : that.eventGroup != null) return false;
        if (eventUser != null ? !eventUser.equals(that.eventUser) : that.eventUser != null) return false;
        if (eventComment != null ? !eventComment.equals(that.eventComment) : that.eventComment != null) return false;
        if (eventDescription != null ? !eventDescription.equals(that.eventDescription) : that.eventDescription != null)
            return false;
        if (eventEndTime != null ? !eventEndTime.equals(that.eventEndTime) : that.eventEndTime != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = equipId != null ? equipId.hashCode() : 0;
        result = 31 * result + (eventStartTime != null ? eventStartTime.hashCode() : 0);
        result = 31 * result + (eventCategory != null ? eventCategory.hashCode() : 0);
        result = 31 * result + (eventCode != null ? eventCode.hashCode() : 0);
        result = 31 * result + (eventGroup != null ? eventGroup.hashCode() : 0);
        result = 31 * result + (eventUser != null ? eventUser.hashCode() : 0);
        result = 31 * result + (eventComment != null ? eventComment.hashCode() : 0);
        result = 31 * result + (eventDescription != null ? eventDescription.hashCode() : 0);
        result = 31 * result + (eventEndTime != null ? eventEndTime.hashCode() : 0);
        return result;
    }
}
